Release 10.1A: OpenEdge Application Server:
Developing WebSpeed Applications
process-web-request
This is the primary procedure for handling Web requests. Web objects run this procedure to respond to form input, as well as to generate HTML pages.
Location:web\template\html-map.wParameters: None Notes:
web\template\wrap-cgi.w
- Both the HTML Mapping Procedure and CGI Wrapper Procedure templates provide suggested code for this routine (the code differs between the two templates). The specific requirements of your Web objects might require modification of that code.
- When the Main Code Block of a Web object runs, it calls
process-web-request. If a Web object is state-aware, subsequent calls to the Web object from the Web browser also runprocess-web-request.- This procedure has four basic functions:
- It determines the context in which it is running. This can be done by checking
REQUEST_METHODor by explicitly usingget-fieldorget-cookieto determine how the Web object was called.- Once the context is determined,
process-web-requestcallsoutputHeader(unless modified otherwise). This sets the MIME header and any cookies on the HTML page that is being returned.- Optionally,
process-web-requestwill read form input from the Web request and populate local fields and variables. This will only be done if the context found in the first step indicates that data is being submitted with the form.- In all cases, a Web object will cause some sort of response to be returned to the WEBSTREAM. This can be an HTML form generated by the Web object itself, or a response generated by a second Web object called by the current Web object.
- Note that
outputHeadermust be run fromprocess-web-requestprior to generating any HTML code. It is also important that all new cookies are created prior to the call tooutputHeader.Examples:- If one Web object is going to run another Web object, it is also important to remember that they should not both run
outputHeader. Only the Web object that is actually creating the HTML page should runoutputHeader.
See also:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |